package com.hxzy.commons.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hxzy.commons.dao.ICacheDao;
import com.hxzy.core.base.dao.impl.BaseDAO;

@Repository
public class CacheDao extends BaseDAO implements ICacheDao{
	public Object getObjectbyHql(String hql,String[] argnames,Object[] args){
		List list = this.getHibernateTemplate().findByNamedParam(hql, argnames, args);
		if(list == null || list.size() <= 0){
			return null;
		}else{
			return list.get(0);
		}
		
	}
}
